home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / misc / Hunk.lha / Hunk / Hoppers / Silver_MULU_256.hop < prev    next >
Text File  |  1998-02-14  |  3KB  |  59 lines

  1. ;*************************************************************************
  2. ;** SilMULU(256)                                                        **
  3. ;** Contributor: L.Lucius                               Nov  15th 1995  **
  4. ;** Modified for HOp:   Thomas Richter  (thor)          Nov  1st  1997  **
  5. ;** Function:    Modify 68000 math routines to use 68020+ instructions. **
  6. ;*************************************************************************
  7.  
  8.  
  9. ;*************************************************************************
  10. ;
  11. ; MULU
  12. ;
  13. #match
  14. #code
  15. 48E7 3C00                       ;   MOVEM.L     D2-D5,-(A7)
  16. 4205                            ;   CLR.B       D5
  17. 4A80                            ;   TST.L       D0
  18. 6A04                            ;   BPL.B       000E
  19. 4605                            ;   NOT.B       D5
  20. 4480                            ;   NEG.L       D0
  21. 4A81                            ;   TST.L       D1
  22. 6A04                            ;   BPL.B       0016
  23. 4605                            ;   NOT.B       D5
  24. 4481                            ;   NEG.L       D1
  25. 3400                            ;   MOVE.W      D0,D2
  26. 3601                            ;   MOVE.W      D1,D3
  27. 4840                            ;   SWAP        D0
  28. 4841                            ;   SWAP        D1
  29. 3803                            ;   MOVE.W      D3,D4
  30. C8C2                            ;   MULU.W      D2,D4
  31. C6C0                            ;   MULU.W      D0,D3
  32. C4C1                            ;   MULU.W      D1,D2
  33. C2C0                            ;   MULU.W      D0,D1
  34. D682                            ;   ADD.L       D2,D3
  35. 2003                            ;   MOVE.L      D3,D0
  36. 4240                            ;   CLR.W       D0
  37. 4840                            ;   SWAP        D0
  38. 4843                            ;   SWAP        D3
  39. 4243                            ;   CLR.W       D3
  40. D883                            ;   ADD.L       D3,D4
  41. D380                            ;   ADDX.L      D0,D1
  42. 4A05                            ;   TST.B       D5
  43. 6704                            ;   BEQ.B       0040
  44. 4484                            ;   NEG.L       D4
  45. 4081                            ;   NEGX.L      D1
  46. 20C1                            ;   MOVE.L      D1,(A0)+
  47. 2084                            ;   MOVE.L      D4,(A0)
  48. 4CDF 003C                       ;   MOVEM.L     (A7)+,D2-D5
  49. 4E75                            ;   RTS
  50. ;
  51. ;
  52. #replace
  53. 4C00 1C00                       ;   MULS.L      D0,D0:D1
  54. 20C0                            ;   MOVE.L      D0,(A0)+
  55. 2081                            ;   MOVE.L      D1,(A0)
  56. 4E75                            ;   RTS
  57. #end
  58.  
  59.